/**
 * @author Andrey Anisimov <hercules@inbox.ru>
 */

import core.util.FixedIntervalTimer;

class Timer extends FixedIntervalTimer {

    /**
     * @public
     * @param {Number} interval (optional) Timer interval, in milliseconds (default is 1000).
     * @constructor
     */
    this.Timer = function(interval) {
        super(interval);
    };

    /**
     * @protected
     * @param {Function} handler
     * @param {Number} timeout
     * @return {Object} timer ID
     */
    this.setTimeout = function(handler, timeout) {
        return window.setTimeout(handler, timeout);
    };

    /**
     * @protected
     * @param {Object} timerId
     */
    this.clearTimeout = function(timerId) {
        window.clearTimeout(timerId);
    };
}